from pymysql import Connection

con = Connection(
    host='localhost',
    port=3306,
    user='root',
    password='mofeiwanli'
)

print(con.get_server_info())
print(con.get_autocommit())
print(con.get_host_info())
print(con.get_proto_info())

# 关闭连接
con.close()
